

package cn.xioabai.common.enums;

/**
 * sql 常用关键字
 *
 * @Author yangdaji
 * @Date 2023/02/18
 * @PackageName cn.xioabai.utils
 * @ClassName SqlKeyWordEnum
 */
public enum SqlKeyWordEnum {
    SELECT("SELECT" + getSpace(), "查询"),
    UPDATE("UPDATE" + getSpace(), "修改"),
    INSERT("INSERT INTO" + getSpace(), "插入"),
    DELETE("DELETE FROM" + getSpace(), "删除"),
    FROM(getSpace() + "FROM" + getSpace(), "选择"),
    WHERE(getSpace() + "WHERE" + getSpace(), "条件"),
    VALUES(getSpace() + "VALUES" + getSpace(), "值"),
    INTO(getSpace() + "INTO" + getSpace(), "到"),
    set(getSpace() + "SET" + getSpace(), "设置"),
    AND(getSpace() + "AND" + getSpace(), "并且"),
    OR(getSpace() + "OR" + getSpace(), "或者"),
    IN(getSpace() + "in" + getSpace(), "包括"),
    ASTERISK(getSpace() + "*" + getSpace(), "星号"),
    RIGHT_BRACKET(")", "右括号"),
    LEFT_BRACKET("(", "左括号"),
    COMMA(",", "逗号"),
    QUESTION("=?", "问号");

    private String name;
    private String descriptor;
    private static final String space = " ";

    private SqlKeyWordEnum(String name, String descriptor) {
        this.name = name;
        this.descriptor = descriptor;
    }

    public String getName() {
        return this.name;
    }

    public String getDescriptor() {
        return this.descriptor;
    }

    public static String getSpace() {
        return " ";
    }
}
